export const collApsed = (prevState={
  isCollapsed:false //初始化，初始化状态
},action) => {
  switch (action.type) {
    case "change_collapsed": let newState = {...prevState}//对老状态进行深复制
          newState.isCollapsed=!newState.isCollapsed;
          return newState;
    default:
      return prevState;
  }
}

export const loadding = (prevState={
    isLoadding:false,
},action)=>{
    let {type,payload} =action
    switch (type) {
        case "change_loadding":let newState = {...prevState}
            newState.isLoadding=payload
            return newState
        default:
            return prevState
    }
}



